Sync run convenience function - #2613
Merged
djspiewak merged 4 commits intoDec 20, 2021
Merged
Conversation
armanbilge
previously approved these changes
Nov 30, 2021
armanbilge
left a comment
Member
There was a problem hiding this comment.
I mean, this looks really great to me! 😁
I think it's worth deprecating the old syncStep, totally removing it without a deprecation phase is a bit rough :P but it would be good to force users to reckon with the ceding/limit issue.
Member
|
It occurred to me, we should also have |
armanbilge
approved these changes
Dec 19, 2021
armanbilge
left a comment
Member
There was a problem hiding this comment.
@djspiewak I added an unsafeRunSyncToPromise method as well, since this is JS land.
This was referenced Feb 23, 2022
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2530
Supersedes #2478
Adds
unsafeRunSyncToFuturetoIOon Scala.js only. This uses a new overload ofsyncStepwhich takes an integer number of steps to allow prior to forcing a yield, defaulting that value to theautoYieldThresholdfrom the runtime itself. We could also mark the oldsyncStepasprivate[effect]if we want to clean things up a bit.This is a good example of a change which is not source-breaking but which is forward-incompatible. I bumped the version to 3.4 to account for this. Please discuss and bikeshed.